summaryrefslogtreecommitdiff
path: root/smoke/docs-main/src/pages/[...slug].astro
diff options
context:
space:
mode:
Diffstat (limited to 'smoke/docs-main/src/pages/[...slug].astro')
-rw-r--r--smoke/docs-main/src/pages/[...slug].astro19
1 files changed, 19 insertions, 0 deletions
diff --git a/smoke/docs-main/src/pages/[...slug].astro b/smoke/docs-main/src/pages/[...slug].astro
new file mode 100644
index 000000000..be6500ec7
--- /dev/null
+++ b/smoke/docs-main/src/pages/[...slug].astro
@@ -0,0 +1,19 @@
+---
+export async function getStaticPaths() {
+ // get english pages that moved from `/` to `/en/`
+ const englishPages = Astro.fetchContent('./en/**/*.md');
+
+ // add pages that are `*.astro` files as well
+ const otherPages = [{ url: '/en/themes' }];
+ return [...englishPages, ...otherPages].map((page) => ({
+ params: {
+ slug: page.url.slice(4),
+ },
+ props: {
+ englishSlug: page.url,
+ },
+ }));
+}
+---
+
+<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />